<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>增加订单</title>
    <link rel="stylesheet" href="lib/layui/css/layui.css">
</head>
<script type="text/javascript" src="lib/js/jquery-1.12.4.js"></script>
<script type="text/javascript" src="lib/layui/layui.js"></script>
<script type="text/javascript" src="lib/js/addOrder.js"></script>
<script>
  //操作后给数据重新排序

</script>

<body>


    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>新增订单</legend>
    </fieldset>
    <script></script>



    <div class="layui-container">
        <div class="layui-tab-item layui-show">
            <table class="layui-table" id="myTable">
                <colgroup>
                    <col width="70">
                    <col width="270">
                    <col width="60">
                    <col width="100">
                    <col width="80">
                    <col width="100">
                    <col width="140">
                </colgroup>
                <thead>
                    <tr>
                        <th style="text-align: center;">序号</th>
                        <th style="text-align: center;">商品名称</th>
                        <th style="text-align: center;">单位</th>
                        <th style="text-align: center;">购买数量</th>
                        <th style="text-align: center;">单价</th>
                        <th style="text-align: center;">库存</th>
                        <th style="text-align: center;">总金额</th>
                        <th style="text-align: center;">操作</th>
                    </tr>
                </thead>
                <tbody id="detail">
                </tbody>
            </table>
            <div class="layui-container">
                <form class="layui-form">


                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label style="width: auto;" class="layui-form-label"><span
                                    style="color: red;">*</span>有效日期:</label>
                            <div class="layui-input-inline">
                                <input style="width: auto;" value="" type="date" id="orderExpirationTime"
                                    name="orderExpirationTime" lay-verify="orderExpirationTime" autocomplete="off"
                                    placeholder="请输入截止日期" class="layui-input">
                            </div>
                        </div>

                        <div class="layui-inline">
                            <label style="width: auto;" class="layui-form-label"><span
                                    style="color: red;">*</span>单据日期:</label>
                            <div class="layui-input-inline">
                                <input value="" type="date" id="createDate" name="createDate" lay-verify="createDate"
                                    autocomplete="off" placeholder="请输入起始日期" class="layui-input">
                            </div>

                        </div>

                        <div class="layui-inline">
                            <label style="width: auto;" class="layui-form-label"><span
                                    style="color: red;">*</span>订单状态:</label>
                            <div class="layui-input-inline">
                                <select id="orderStatus" name="status" lay-verify="payStatus">
                                    <option value="">请选择</option>
                                    <option value="1">未付款</option>
                                    <option value="2">部分付款</option>
                                    <option value="3">已结算</option>
                                </select>
                            </div>
                        </div>
                        <div class="layui-inline">
                            <div class="layui-input-inline">
                                <input type="button" class="layui-btn layui-btn-normal" value="新增一行" onclick="add()">
                            </div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-inline">
                            <label style="width: auto;" class="layui-form-label"><span
                                    style="color: red;">*</span>客户:</label>
                            <div class="layui-input-inline">
                                <input id="customer" class="layui-input" name="customer" lay-verify="customer" readonly
                                    value="" placeholder="单击此处选择客户">
                                <input id="customerId" type="hidden" value="">
                            </div>
                        </div>


                        <div class="layui-inline">
                            <label class="layui-form-label"><span style="color: red;">*</span>应付金额:</label>
                            <div class="layui-input-inline">
                                <input style="width: auto;" type="text" id="total" name="totalAmount"
                                    lay-verify="totalAmount" readonly autocomplete="off" placeholder="付款金额"
                                    class="layui-input">
                                <input type="hidden" id="oldTotal" value="">
                            </div>
                        </div>

                        <div class="layui-inline">
                            <label style="width: auto;" class="layui-form-label"><span
                                    style="color: red;">*</span>实付金额:</label>
                            <div class="layui-input-inline">
                                <input style="width: auto;" type="text" id="amountPaid" name="amountPaid"
                                    lay-verify="amountPaid" autocomplete="off" placeholder="请输入实付金额"
                                    class="layui-input">
                            </div>
                        </div>
                        <div class="layui-inline">
                            <div class="layui-input-inline">
                                <button type="button" lay-submit="" lay-filter="handin"
                                    class="layui-btn layui-btn-normal">提交</button>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</body>

</html>